﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace EFong.Contract
{
    [DataContract]
    public class OtherPayment
    {
        private Guid _id = Guid.NewGuid();
        [DataMember]
        public Guid ID
        {
            get { return _id; }
            set { _id = value; }
        }

        private DateTime _date;
        [DataMember]
        public DateTime Date
        {
            get { return _date; }
            set { _date = value; }
        }

        private BankAccount _bankAccount;
        [DataMember]
        public BankAccount BankAccount
        {
            get { return _bankAccount; }
            set { _bankAccount = value; }
        }

        private decimal _amount;
        [DataMember]
        public decimal Amount
        {
            get { return _amount; }
            set { _amount = value; }
        }

        private string _content = string.Empty;
        [DataMember]
        public string Content
        {
            get { return _content; }
            set { _content = value; }
        }

        private string _type = string.Empty;
        [DataMember]
        public string Type
        {
            get { return _type; }
            set { _type = value; }
        }

        private string _remark = string.Empty;
        [DataMember]
        public string Remark
        {
            get { return _remark; }
            set { _remark = value; }
        }

        public override bool Equals(object obj)
        {
            OtherPayment temp = obj as OtherPayment;
            if (temp == null)
                return false;
            return (this.ID.Equals(temp.ID));
        }
    }
}

